/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package homomorphism.NewAPI;

import org.apache.hadoop.mapreduce.Partitioner;
import utility.LongPair;

/**
 *
 * @author takeshi
 */
public class LHPartitioner<V> extends Partitioner<LongPair, V> {

    @Override
    public int getPartition(LongPair key, V value, int numReduceTasks) {
        return (int) (key.getFirst() * 127) % numReduceTasks;
    }
}
